﻿namespace Home.Data
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.Diagnostics;
    using System.Linq;
    using System.Runtime.Serialization;
    using System.Text;
    using System.Threading.Tasks;

    public abstract class Entity
    {
        [Key]
        [DataMember]
        public Guid Id { get; set; }

        [DataMember]
        public DateTimeOffset Created { get; set; }

        [DataMember]
        public string CreatedBy { get; set; }

        [DataMember]
        public DateTimeOffset Modified { get; set; }

        [DataMember]
        public string ModifiedBy { get; set; }

        [ConcurrencyCheck]
        [DataMember]
        public byte[] RowVersion { get; set; }
    }
}
